﻿using CacheHelper;
using CSRedis;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace InstanceCSRedis
{
    class CSRedis : ICache
    {
       //private static CSRedis CacheClient;
        private static CSRedisClient rds;

        static readonly object _lock = new object();
        static CSRedis()
        {
            if (rds == null)
            {
                lock (_lock)
                {
                    if (rds == null)
                    {
                        try
                        {
                            rds = new CSRedisClient(ConfigurationManager.AppSettings["CSRedisConnectionString"]);
                        }
                        catch (Exception ex)
                        {

                        }
                    }
                }

            }
        }
        public long CacheCount()
        {
            rds.coun
            throw new NotImplementedException();
        }

        public long CacheMemony()
        {
            throw new NotImplementedException();
        }

        public bool Exists(string key)
        {
            throw new NotImplementedException();
        }

        public T GetCache<T>(string cacheKey) where T : class
        {
            throw new NotImplementedException();
        }

        public void RemoveCache(string cacheKey)
        {
            throw new NotImplementedException();
        }

        public void RemoveCache()
        {
            throw new NotImplementedException();
        }

        public void WriteCache<T>(T value, string cacheKey) where T : class
        {
            throw new NotImplementedException();
        }

        public void WriteCache<T>(T value, string cacheKey, DateTime expireTime) where T : class
        {
            throw new NotImplementedException();
        }

        public void WriteCache<T>(T value, string cacheKey, TimeSpan validFor) where T : class
        {
            throw new NotImplementedException();
        }
    }
}
